#ifndef _DANIEL_KERR_MSGHANDLER_H
#define _DANIEL_KERR_MSGHANDLER_H

#include "driver.h"

#define NO_OS 11

class msgHandler
{
	public:
		msgHandler()
		{
			elem = 1;

			data.push_back("Messages:");
			for(int i=1;i<NO_OS;++i)
			{data.push_back("");}
		}

		void add(string s)
		{
			if(elem!=(NO_OS-1))
			{
				data[elem]=s;
				++elem;
			}
			else
			{
				for(int i=1;i<(NO_OS-1);++i)
				{data[i]=data[i+1];}
				data[elem]=s;
			}
		}

		void add(vector <string> s)
		{
			for(unsigned int i=0;i<s.size();++i)
			{add(s[i]);}
		}

		void clear()
		{
			elem = 1;

			data.clear();
			data.push_back("Messages:");
			for(int i=1;i<NO_OS;++i)
			{data.push_back("");}			
		}

		vector <string> msgs() {return data;}

	private:
		int elem;
		vector <string> data;
};

#endif